﻿<link href="@Url.Content("~/Content/Admin.css")" rel="stylesheet" type="text/css" />

@model XichLoGreen.Models.LoginModel
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";

    XichLoGreen.Models.UserModel user = null;
    try
    {
        user = (XichLoGreen.Models.UserModel)Session["Account"];
    }
    catch (Exception)
    {
        throw;
    }
}

@if (user == null)
{
    using (Html.BeginForm("Login", "Admin", FormMethod.Post))
    {
    <div class="login-form clear">
        <span>
            @Html.LabelFor(m => m.Username)
            @Html.TextBoxFor(m => m.Username)
            @Html.ValidationMessageFor(m => m.Username)
        </span>
        <span>
            @Html.LabelFor(m => m.Password)
            @Html.PasswordFor(m => m.Password)
            @Html.ValidationSummary()
        </span>
        <span>
            <input input type="submit" value="Login" />
        </span>
    </div>
    }
}
